package task

import "errors"

type Input struct {
	Kafka Kafka
	//Kafka1 Kafka
}

type Kafka struct {
	Bootstrap_servers string
	Topics            []string
	Auto_offset_reset string
	Client_id         string
	Group_id          string
	Condition         Condition
	Topic_id          string
	Codec             string
}

func (input Input) IsValid() error {
	if input.Kafka.Bootstrap_servers == "" {
		return errors.New("input.kafka.bootstrap_servers is nil or not set")
	}
	if len(input.Kafka.Topics) == 0 {
		return errors.New("input.kafka.topics is [] or not set")
	}
	return nil
}
